﻿using System;
using Avalonia.Controls;
using Avalonia.Interactivity;

namespace iOSClub.WikiApp.Pages;

public partial class SitePage : UserControl
{
    public SitePage(string url)
    {
        InitializeComponent();
        if (string.IsNullOrEmpty(url)) return;
        WebView.Url = new Uri(url);
    }

    private void BackClick(object? sender, RoutedEventArgs e)
    {
        WebView.GoBack();
    }

    private void ForwardClick(object? sender, RoutedEventArgs e)
    {
        WebView.GoForward();
    }
}